package com.kz.himalaya.application;

import android.app.Application;

import com.kz.himalaya.interfaces.HttpService;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/1/23.
 */

public class MyApplication extends Application {
    private HttpService service;

    @Override
    public void onCreate() {
        super.onCreate();
        initHttp();
    }

    private void initHttp() {
        service = new Retrofit.Builder()
                .baseUrl("http://mobile.ximalaya.com/")
                .addConverterFactory(GsonConverterFactory.create())
                .build()
                .create(HttpService.class);
    }

    public HttpService getService() {
        return service;
    }
}
